//
//  KDLoggerConfig.h
//  RRSnap
//
//  Created by 姚 宗超 on 2/21/13.
//  Copyright (c) 2013 chen yi. All rights reserved.
//
#import "LumberjackUser.h"
#import "DDLog.h"
#import "DDTTYLogger.h"

#define APP_DEBUG

// 控制KDLog是否打印数据
//#define LOG_OFF

// Log levels: off, error, warn, info, verbose
#ifndef LOG_OFF
    #if defined(APP_DEBUG) && defined(yaozongchao)
    static int ddLogLevel = LOG_LEVEL_VERBOSE; // Log level for robbie (debug)
    #elif defined(APP_DEBUG)
    static int ddLogLevel = LOG_LEVEL_INFO;    // Log level for other team members (debug)
    #else
    static int ddLogLevel = LOG_LEVEL_WARN;    // Log level for release build
    #endif
#else
    static int ddLogLevel = LOG_LEVEL_OFF;
#endif



// 方法跟踪
#define KDLogTrace()  DDLogVerbose(@"[TRACE] %@,%@",THIS_FILE,THIS_METHOD)

// 基本Log
#define KDLog(frmt, ...)  DDLogVerbose((@"[DEFAULT] %@,%@ " frmt), THIS_FILE,THIS_METHOD,  ##__VA_ARGS__)

// Info型Log
#define KDLogInfo(frmt, ...)  DDLogInfo((@"[INFO] %@,%@ " frmt), THIS_FILE,THIS_METHOD,  ##__VA_ARGS__)
#define RSLogCInfo(frmt, ...) DDLogInfo((@"[CINFO] " frmt),  ##__VA_ARGS__)

// Warn型Log
#define KDLogWarn(frmt, ...)  DDLogWarn((@"[WARN] %@,%@ " frmt), THIS_FILE,THIS_METHOD,  ##__VA_ARGS__)
#define RSLogCWarn(frmt, ...)  DDLogCWarn((@"[CWARN] " frmt), ##__VA_ARGS__)

// Error型Log
#define KDLogError(frmt, ...)  DDLogError((@"[ERROR] %@,%@ " frmt), THIS_FILE,THIS_METHOD,  ##__VA_ARGS__)
#define RSLogCError(frmt, ...)  DDLogCError((@"[CERROR] " frmt), ##__VA_ARGS__)
